package dao

import (
	"card/pkg/database"
)

const CardDb = "card"

type DbOption func(m *database.DbComponent)

func WithWhere(query interface{}, args ...interface{}) DbOption {
	return func(m *database.DbComponent) {
		m.Where(query, args)
	}
}
func WithSelect(fields []string) DbOption {
	return func(m *database.DbComponent) {
		m.Select(fields)
	}
}
func WithOrder(order string) DbOption {
	return func(m *database.DbComponent) {
		m.Order(order)
	}
}
